#include<bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
string s[100];

signed main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int x = 0;
    string a;
    while (cin >> a) {
        s[x] = a;
        x++;
    }
    for (int i = x - 1; i >= 0; i--) {
        if (i == x - 1) cout << s[i];
        else cout << " " << s[i];
    }
    return 0;
}